For software debugging or performance analysis, a trace flow enables the reconstruction of a monitored program flow and is therefore useful to determine which kind of events took place before a particular software problem arose. For debugging purposes, usually only a limited trace depth is needed if the trigger logic allows stopping the trace recording at or shortly after the error symptom. However, for performance analysis, long traces with high timing resolution are needed to measure the min/max/average function execution time. This analysis may be flat or nested with the full hierarchy of function calls.
Conventional trace interfaces have several disadvantages. One disadvantage is the required high bandwidth interface for the trace which typically requires at least 5 trace pins. Another disadvantage is that the time stamping is done externally. The on-chip first in first out (FIFO) buffer for trace messages can result in a certain inaccuracy of the time stamps.
Therefore, there exists a need for a system and a method for generating compact function trace data in a microprocessor for debugging and performance analysis that lowers cost and requires less bandwidth.